// components/component-tag-name.js
Component({
    /**
     * 组件的属性列表
     */
    properties: {
        navId: String
    },

    /**
     * 组件的初始数据
     */
    data: {

    },

    /**
     * 组件的方法列表
     */
    methods: {
        navToLink(e) {
            console.log(e.currentTarget.dataset)
            if (this.data.navId == e.currentTarget.dataset.id) return;
            switch (e.currentTarget.dataset.id) {
                case "1":
                    wx.switchTab({
                        url: '/pages/shop_index/shop_index',
                    })
                    break;
                case "2":
                    wx.switchTab({
                        url: "/pages/classify-index/classify-index",
                    })
                    break;
                case "3":
                    wx.switchTab({
                        url: "/pages/shop-cart/shop-cart",
                    })
                    
                    break;
                case "4":
                    wx.switchTab({
                        url: "/pages/personal/personal",
                    })

                    break;
            }
        }
    }
})